From: Keir Fraser Date: Tue, 6 May 2008 15:20:54 +0000 (+0100) Subject: x86 hvm: Warn only once per time source when the periodic tiemout is X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14215^2~63 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=08fe56f0cd8c00e4b3e12874cfc5c98fa7466e3b;p=xen.git x86 hvm: Warn only once per time source when the periodic tiemout is set 'too small'. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index 16f886647d..832c9042d7 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -338,9 +338,9 @@ void create_periodic_time( /* Periodic timer must be at least 0.9ms. */ if ( (period < 900000) && !one_shot ) { - gdprintk(XENLOG_WARNING, - "HVM_PlatformTime: program too small period %"PRIu64"\n", - period); + if ( !test_and_set_bool(pt->warned_timeout_too_short) ) + gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too " + "small period %"PRIu64"\n", period); period = 900000; } diff --git a/xen/include/asm-x86/hvm/vpt.h b/xen/include/asm-x86/hvm/vpt.h index b7176e89b1..d05d0dfa27 100644 --- a/xen/include/asm-x86/hvm/vpt.h +++ b/xen/include/asm-x86/hvm/vpt.h @@ -78,6 +78,7 @@ struct periodic_time { bool_t one_shot; bool_t do_not_freeze; bool_t irq_issued; + bool_t warned_timeout_too_short; #define PTSRC_isa 1 /* ISA time source */ #define PTSRC_lapic 2 /* LAPIC time source */ u8 source; /* PTSRC_ */